import common.globaldefines

class WebApiManager(common.globaldefines.ThreadBase):

    def __init__(self, listenport: int = 13400):
        super().__init__()
        self._listenport = listenport

    def threadLoop(self):
        from . import api
        api.start(self._listenport)

    def stop(self):
        from . import api
        api.shutdown()
        return super().stop()